//
//  ACViewController.m
//  MySegment
//
//  Created by Adiljan on 2016/12/6.
//  Copyright © 2016年 Adiljan. All rights reserved.
//

#import "ACViewController.h"

@interface ACViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (weak, nonatomic) IBOutlet UITableView *tblAC;

@property (nonatomic, strong) NSMutableArray *dataArray;
@end

@implementation ACViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.tblAC.dataSource = self;
    self.tblAC.delegate = self;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (NSMutableArray *)dataArray{
    if (!_dataArray) {
        _dataArray = [NSMutableArray new];
        for (int i=0; i<15; i++) {
            [_dataArray addObject:[NSString stringWithFormat:@"AC__cell__%d",i]];
        }
        
    }
    return _dataArray;
}
#pragma mark tableViewDataSource
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return self.dataArray.count;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell *cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
    cell.textLabel.text=self.dataArray[indexPath.row];
    return cell;
    
}

//选中时将选中行的在self.dataArray 中的数据添加到删除数组self.deleteArr中
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    
}

@end
